package com.higold.cloud.mvp.model

import com.higold.cloud.mvp.model.bean.userInfo.UserInfo
import com.higold.cloud.net.RetrofitManager
import com.higold.cloud.rx.scheduler.SchedulerUtils
import io.reactivex.Observable

/**
 *    author : lxz
 *    date   : 2019/9/10 9:08
 *    desc   :
 */
class UserInfoModel {

    /**
     * 获取 UserInfo
     */
    fun getUserInfo(accountId: Int): Observable<UserInfo> {

        return RetrofitManager.service.getUserInfo(accountId)
                .compose(SchedulerUtils.ioToMain())
    }
}